package com.itheima.controller;

import com.itheima.entity.Account;
import com.itheima.service.AccountService;
import com.itheima.service.impl.AccountServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

@Controller
public class AccountController {

    @Autowired
    @Qualifier("accountService")
    private AccountService accountService;


    public void save(Account account) {
        //int i=1/0;
        accountService.save(account);
    }

    public Account findById(int id) {


        return accountService.findById(id);
    }

}
